[#macro select id datas key text    class=""]
   <select id="${id}" name="${id}" class="${class!''}">
      [#list datas as data]
           <option value="${data[key]}" >${data[text]}</option>
      [/#list]
   </select>
[/#macro]


[#macro select2 id datas key value=""  text="" class=""]
   <select id="${id}" name="${id}" class="${class!''}">
      [#list datas as data]
        [#if key??]
          [#if value == data[key]]
         	<option value="${data[key]}" selected>${data[text]}</option>
          [#else]
           <option value="${data[key]}">${data[text]}</option>
         [/#if]
        [#else]
          [#if value == data]
         	<option value="${data}" selected>${data}</option>
         [#else]
            <option value="${data}">${data}</option>
        [/#if]
       [/#if] 
      [/#list]
   </select>
[/#macro]